//
//  GameObjectItemDelegate.h
//  Editor
//
//  Created by Jeppe Nielsen on 11/14/14.
//  Copyright (c) 2014 Jeppe Nielsen. All rights reserved.
//

#pragma once

#include <QtWidgets/QStyledItemDelegate>
#include <QtWidgets/QtWidgets>
#include "SerializedProperty.hpp"

class GameObjectItemDelegate : public QStyledItemDelegate
{
    Q_OBJECT
public:
    GameObjectItemDelegate(QWidget *parent = 0) : QStyledItemDelegate(parent) {}

    void paint(QPainter *painter, const QStyleOptionViewItem &option,
               const QModelIndex &index) const;
    QSize sizeHint(const QStyleOptionViewItem &option,
                   const QModelIndex &index) const;
    QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option,
                          const QModelIndex &index) const;
    void setEditorData(QWidget *editor, const QModelIndex &index) const;
    void setModelData(QWidget *editor, QAbstractItemModel *model,
                      const QModelIndex &index) const;

private slots:
    void commitAndCloseEditor();

private:


};
